import { reqUserInfo } from '@/api'
export default {
    actions: {
        async getUserInfo({ commit }, id) {
            let res = await reqUserInfo(id)
            if (res.code == 200) {
                commit('GETUSERINFO', res.data[0])
            }
        },
    },
    mutations: {
        GETUSERINFO(state, data) {
            state.userInfo = data
        },
    },
    state: {
        uid: sessionStorage.getItem('uid') || '',
        userInfo: {}
    },
    getters: {
    },
    modules: {
    }
}